﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.ComponentModel.DataAnnotations;

namespace PhoneBilling.Models
{
    public class DiscountModel
    {
        public int ItemNo { get; set; }

        public bool IsNew { get; set; }

        [Required(ErrorMessage = "请输入优惠名称.")]
        [Display(Name = "优惠名称：")]
        public string 优惠名称 { get; set; }

        [Display(Name = "是否每日：")]
        public bool 是否每日 { get; set; }

        public string 折扣类别 { get; set; }
        //public bool 是否按话类 { get; set; }
        //public bool 是否按区号 { get; set; }

        [Display(Name = "优惠区号：")]
        public string 优惠区号 { get; set; }

        [Display(Name = "优惠话类：")]
        public string 优惠话类 { get; set; }

        public List<UIAreaType> 优惠话类List { get; set; }

        [Required(ErrorMessage = "请输入基本费折扣.")]
        [Display(Name = "基本费折扣：")]
        [Range(0d, 1d, ErrorMessage = "折扣范围应该是0至1之间，0为该项收费为0，1为无折扣")]
        public string 基本费折扣 { get; set; }

        [Required(ErrorMessage = "请输入附加费折扣.")]
        [Display(Name = "附加费折扣：")]
        [Range(0d, 1d, ErrorMessage = "折扣范围应该是0至1之间，0为该项收费为0，1为无折扣")]
        public string 附加费折扣 { get; set; }

        [Required(ErrorMessage = "请输入服务费折扣.")]
        [Display(Name = "服务费折扣：")]
        [Range(0d ,1d,ErrorMessage="折扣范围应该是0至1之间，0为该项收费为0，1为无折扣")]
        public string 服务费折扣 { get; set; }

        [Required(ErrorMessage = "请输入起始时间.")]
        [Display(Name = "起始时间：")]
        public DateTime 起始时间 { get; set; }
        public DateTime 起始时间Time { get; set; }

        [Required(ErrorMessage = "请输入终止时间.")]
        [Display(Name = "终止时间：")]
        public DateTime 终止时间 { get; set; }
        public DateTime 终止时间Time { get; set; }
    }
}